#ifndef __CHASSIS_CONTROL_H
#define __CHASSIS_CONTROL_H

#include "stm32f1xx_hal.h"
#include "main.h"

#define MOTOR1_PORT GPIOA
#define MOTOR2_PORT GPIOB
#define MOTOR3_PORT GPIOB
#define MOTOR4_PORT GPIOB

#define MOTOR1_A_PIN GPIO_PIN_4
#define MOTOR1_B_PIN GPIO_PIN_5
#define MOTOR2_A_PIN GPIO_PIN_10
#define MOTOR2_B_PIN GPIO_PIN_11
#define MOTOR3_A_PIN GPIO_PIN_3
#define MOTOR3_B_PIN GPIO_PIN_4
#define MOTOR4_A_PIN GPIO_PIN_5
#define MOTOR4_B_PIN GPIO_PIN_6

#define MOTOR1_PWM_CHANNEL TIM_CHANNEL_1
#define MOTOR2_PWM_CHANNEL TIM_CHANNEL_2
#define MOTOR3_PWM_CHANNEL TIM_CHANNEL_3
#define MOTOR4_PWM_CHANNEL TIM_CHANNEL_4

extern TIM_HandleTypeDef htim2;

void Car_GoForeward(void);
void Car_GoReserve(void);
void Car_GoLeft(void);
void Car_GoRight(void);
void Car_TurnClockwise(void);
void Car_TurnAnticlockwise(void);
void CarStop(void);


#endif

